home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- SnoopStrings
- SnoopStrings/Description_File
- SnoopStrings/Filter
- SnoopStrings/History
- SnoopStrings SnoopStrings
-
- NAME
- SnoopStrings -- Extracts strings from (binary) file
-
- SYNOPSIS
- SnoopStrings
- FILE/A,TO/A,FILTER/A/K,EXCLUDE/K,INCLUDE/K,STRLEN/N,NOEOS/S,QUIET/S
-
- FUNCTION
- The purpose of SnoopStrings command is to search string candidates
- from binary files and write a report (description file) of its
- findings.
- SnoopStrings command uses four methods to identify a string: legal
- characters, EOS mark, continuity and lenght of a string.
- Legal characters (or readable characters) can be defined in a filter
- file. When you invoke SnoopStrings, you must supply the name of the
- filter file (see FILTER parameter) being used. Through reading the
- filter SnoopStrings knows which characters are readable (legal string
- characters) and which are not.
- End Of String mark (EOS) is usually used for identifying the end of
- strings. By default SnoopStrings accepts only byte streams ending with
- EOS as strings. This requirement can be turned off with the NOEOS
- option.
- Continuity of a string means that its byte sequence may contain only
- legal characters so that sequence is uninterrupted. This may sound more
- complicated than it is. In other words, illegal characters are not
- allowed within a string. For example, if character $ is not a legal
- character and we have a following EOS-ending string, which is, by the
- way, not true:
-
- 'I was paid $10 for writing SnoopStrings.'
-
- SnoopStrings will see it as follows:
-
- '10 for writing SnoopStrings.'
-
- As an illegal character the $ sign splits the string into two halves.
- The first half is not accepted and recognized because of a missing EOS
- mark.
- String length is used for cutting off short and meaningless strings.
- String '3r' with EOS mark is probably not a string but a piece of
- program code which happens to have string characteristics. By default
- SnoopStrings uses a minimum string length of 3. You can alter the string
- length with STRLEN parameter.
- When you use SnoopStrings, you will notice that it finds a lot of
- strings which, in fact, are not strings at all. SnoopStrings reduces
- your work but does not eliminate it.
-
- INPUTS
- FILE/A - name of the (binary) file to be examined
- TO/A - name of the output file (description file)
- FILTER/A/K - name of the filter file
- EXCLUDE/K - characters to be omitted despite of the filter.
- 8-bit hexadecimal numbers.
- INCLUDE/K - characters to be accepted despite of the filter.
- 8-bit hexadecimal numbers.
- STRLEN/N - minimum length of a string. Strings shorter than this are
- not considered as string.
- NOEOS/S - do not search for end of string marks (EOS). By default
- every string must end to an EOS mark
- QUIET/S - no progress report
-
- RESULT
- The search result will be written into a named description file.
-
- EXAMPLE
- SnoopStrings snoopstrings to RAM:snoopstrings.dsc FILTER usa.flt
-
- Extracts strings from the binary file 'snoopstrings' and writes
- string descriptions into an ASCII file named as 'snoopstrings.dsc'.
-
- SnoopStrings list to RAM:list.dsc FILTER usa.flt INCLUDE 09A9AE
-
- Extracts strings from the binary file 'list' and writes string
- descriptions into an ASCII file named as 'list.dsc'. Parameter
- INCLUDE defines characters which as hexadecimal ASCII codes are 09,
- A9, and AE as valid string characters.
-
- BUGS
- None known.
-
- SEE ALSO
- WriteStrings
- Description_File
- Filter
-
- SnoopStrings/Description_File SnoopStrings/Description_File
-
- DESCRIPTION FILE
- SnoopString command stores found strings into a description file.
- Description file is an ASCII file containing string descriptions. It can
- be edited by using ordinary text editor.
-
- FILE FORMAT
- <signature>\n<address> <str_length> <flags> <values> <string>
-
- <signature> - description file signature. For version 1.0 it is:
- SNS0100DESC
- \n - new line code
- <address> - string's hexadecimal start address in a file
- (relative to the beginning of a file)
- <str_length> - string length (hexadecimal value)
- <flags> - write flags
- <values> - string in 8-bit hexadecimal codes (two digits). Each code
- is separated with space
- <string> - string in characters. EOS mark is not printed but the hex
- code is present
-
- FLAGS
- Flags are instructions to WriteStrings command, describing how altered
- strings should be written into the target file. There are three kinds of
- flags:
-
- - no operation: Do not touch to the corresponding byte
- ? write character: Set byte according to a character
- . end of string: Sets EOS mark despite of character or hex value
- # write code: Set byte according to byte's hex value
-
- When flag '-' is used, WriteStrings just copies a byte from the original
- file, not changing it in any way. Flag '?' commands WriteStrings to
- write the altered character into the target file. Programs usually
- require an EOS mark at the end of each string. You can set the EOS with
- the flag '.'. '#' flag does the same as '?' flag except that instead of
- the altered character, the altered hex value will be written into the
- target file.
-
- EXAMPLES
- The following string description has been written into a description
- file:
-
- 00000C9A 000C ???????????. 53 4E 53 30 31 30 30 44 45 53 43 00 SNS0100DESC
-
- If you want to change the string to 'SNS21DESC', the following
- modifications are required:
-
- 00000C9A 000C ?????????... 53 4E 53 30 31 30 30 44 45 53 43 00 SNS21DESC
-
- NOTES
- Never write extra bytes to the string. It is very important that string
- length remains the same. By writing a longer string you always overwrite
- something. It might be a another string or a program code.
-
- SnoopStrings/Filter SnoopStrings/Filter
-
- FILTER
- In a filter file you can enumerate valid characters, i.e. characters to
- be accepted as a part of a string.
-
- FILE FORMAT
- <signature> <values>
-
- <signature> - filter file signature. For version 1.0 it is: SNS0100FILT
- <values> - character codes (8-bit hexadecimal values) separated by a
- space. Two digits are required
-
- EXAMPLES
- SNS0100FILT 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
-
- SnoopStrings/History SnoopStrings/History
-
- VERSION
- 1.0
-
- DATE
- 01.05.2000
-
- COMMENT
- First release.
-
- NEW
- -
-
- CHANGED
- -
-
- REMOVED
- -
-
-